div p {
  color: red;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.box, .box p {
  font-size: 20px;
  text-align: center;
  letter-spacing: normal;
}
p {
  color: red;
}

p1 {
  width: 10px;
  height: 30px;
  background-color: red;
}

p2 {
  width: 20px;
  height: 30px;
  background-color: red;
}

p3 {
  width: 30px;
  height: 30px;
  background-color: red;
}

p1 {
  width: 10px;
  height: 30px;
  background-color: yellow;
}

p2 {
  width: 20px;
  height: 30px;
  background-color: yellow;
}

p3 {
  width: 30px;
  height: 30px;
  background-color: yellow;
}

p4 {
  width: 40px;
  height: 30px;
  background-color: yellow;
}

.demo, .boxx {
  font-size: 10px;
}